package wang.kentwang.beans;
/**
 * 
 * @author kent
 *
 */
public class User {
	
	private int id;
	
	private String name;
	
	private String phone;
	
	private int age;
	

	public User() {
		super();
	}

	public User(String name, String phone, int age) {
		super();
		this.name = name;
		this.phone = phone;
		this.age = age;
	}

	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getPhone() {
		return phone;
	}

	public void setPhone(String phone) {
		this.phone = phone;
	}

	public int getAge() {
		return age;
	}

	public void setAge(int age) {
		this.age = age;
	}

	@Override
	public String toString() {
		return "\"id\":\"" + id + "\", \"name\":\"" + name + "\", \"phone\":\"" + phone + "\", \"age\":\"" + age + "\"";
	}
	
	//重新编辑了toString的格式,直接可输出json格式对象
	
	
	

	//重新编辑了toString的格式，近似json格式，因为\"无法在格式中直接加上
//	public String toString() {
//		return "\"name\":" + name + ", \"phone\":" + phone;
//	}
	
	
	
	
}
